#ifndef REQUESTIDGENERATOR_H
#define REQUESTIDGENERATOR_H

#include <qmutex.h>
#include <QMutexLocker>

class RequestIDGenerator
{
public:
    static RequestIDGenerator *getInstance()
    {
        QMutexLocker locker(&m_mutex);
        if(m_instance == NULL)
        {
            m_instance = new RequestIDGenerator();
        }
        return m_instance;
    }

    unsigned int getGlobeRequestID();

    RequestIDGenerator();

    ~RequestIDGenerator();

private:

    static QMutex m_mutex;

    static RequestIDGenerator *m_instance;

    unsigned int m_globeRequestID;

};
#endif
